import request from '@/utils/request'

const LApi = {
  list: '/log-pipeline/list',
  get: '/log-pipeline/get',
  save: '/log-pipeline/save',
  delete: '/log-pipeline/delete',
  restart: '/log-pipeline/restart',
  stop: '/log-pipeline/stop',
}

export function queryPipeline (data) {
  return request({
    url: LApi.list,
    method: 'post',
    data: data
  })
}

export function getPipeline (id) {
  return request({
    url: LApi.get,
    method: 'get',
    params: {id: id}
  })
}

export function savePipeline (data) {
  return request({
    url: LApi.save,
    method: 'post',
    data: data
  })
}

export function deletePipeline (id) {
  return request({
    url: LApi.delete,
    method: 'post',
    data: {id: id}
  })
}
export function restartPipeline (id) {
  return request({
    url: LApi.restart,
    method: 'post',
    data: {id: id}
  })
}
export function stopPipeline (id) {
  return request({
    url: LApi.stop,
    method: 'post',
    data: {id: id}
  })
}

